home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / CIncludes / Quickdraw.h < prev    next >
Text File  |  1990-12-13  |  27KB  |  960 lines

  1. /************************************************************
  2.  
  3. Created: Saturday, September 16, 1989 at 11:00 PM
  4.     Quickdraw.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1985-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QUICKDRAW__
  15. #define __QUICKDRAW__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #define invalColReq -1                /*invalid color table request*/
  22. #define srcCopy 0                    /*the 16 transfer modes*/
  23. #define srcOr 1
  24. #define srcXor 2
  25. #define srcBic 3
  26. #define notSrcCopy 4
  27. #define notSrcOr 5
  28. #define notSrcXor 6
  29. #define notSrcBic 7
  30. #define patCopy 8
  31. #define patOr 9
  32. #define patXor 10
  33. #define patBic 11
  34. #define notPatCopy 12
  35. #define notPatOr 13
  36. #define notPatXor 14
  37. #define notPatBic 15
  38.  
  39. /* Arithmetic transfer modes */
  40.  
  41. #define blend 32
  42. #define addPin 33
  43. #define addOver 34
  44. #define subPin 35
  45. #define addMax 37
  46. #define subOver 38
  47. #define adMin 39
  48.  
  49. /* Transparent mode constant */
  50.  
  51. #define transparent 36
  52.  
  53. /* QuickDraw color separation constants
  54.  
  55.  */
  56.  
  57. #define normalBit 0                 /*normal screen mapping*/
  58. #define inverseBit 1                /*inverse screen mapping*/
  59. #define redBit 4                    /*RGB additive mapping*/
  60. #define greenBit 3
  61. #define blueBit 2
  62. #define cyanBit 8                    /*CMYBk subtractive mapping*/
  63. #define magentaBit 7
  64. #define yellowBit 6
  65. #define blackBit 5
  66. #define blackColor 0x0021            /*colors expressed in these mappings*/
  67. #define whiteColor 0x001E
  68. #define redColor 0x00D1
  69. #define greenColor 0x0149
  70. #define blueColor 0x0185
  71. #define cyanColor 0x010D
  72. #define magentaColor 0x0095
  73. #define yellowColor 0x0059
  74. #define picLParen 0                 /*standard picture comments*/
  75. #define picRParen 1
  76. #define normal 0
  77. #define bold 1
  78. #define italic 2
  79. #define underline 4
  80. #define outline 8
  81. #define shadow 0x10
  82. #define condense 0x20
  83. #define extend 0x40
  84. #define clutType 0                    /*0 if lookup table*/
  85. #define fixedType 1                 /*1 if fixed table*/
  86. #define directType 2                /*2 if direct values*/
  87. #define gdDevType 0                 /*0 = monochrome 1 = color*/
  88. #define ramInit 10                    /*1 if initialized from 'scrn' resource*/
  89. #define mainScreen 11                /* 1 if main screen */
  90. #define allInit 12                    /* 1 if all devices initialized */
  91. #define screenDevice 13             /*1 if screen device [not used]*/
  92. #define noDriver 14                 /* 1 if no driver for this GDevice */
  93. #define screenActive 15             /*1 if in use*/
  94. #define hiliteBit 7                 /*flag bit in HiliteMode (lowMem flag)*/
  95. #define pHiliteBit 0                /*flag bit in HiliteMode used with BitClr procedure*/
  96. #define defQDColors 127             /*resource ID of clut for default QDColors*/
  97.  
  98. enum {frame,paint,erase,invert,fill};
  99. typedef unsigned char GrafVerb;
  100.  
  101. enum {chunky,chunkyPlanar,planar};
  102. typedef unsigned char PixelType;
  103.  
  104. typedef short Bits16[16];
  105.  
  106. typedef unsigned char Pattern[8];
  107. typedef Pattern *PatPtr, **PatHandle;
  108. typedef char QDByte, *QDPtr, **QDHandle;
  109.  
  110. typedef short QDErr;
  111.  
  112.  
  113.  
  114. struct FontInfo {
  115.     short ascent;
  116.     short descent;
  117.     short widMax;
  118.     short leading;
  119. };
  120.  
  121. typedef struct FontInfo FontInfo;
  122. struct BitMap {
  123.     Ptr baseAddr;
  124.     short rowBytes;
  125.     Rect bounds;
  126. };
  127.  
  128. typedef struct BitMap BitMap;
  129. typedef BitMap *BitMapPtr, **BitMapHandle;
  130.  
  131. struct Cursor {
  132.     Bits16 data;
  133.     Bits16 mask;
  134.     Point hotSpot;
  135. };
  136.  
  137. typedef struct Cursor Cursor;
  138. typedef Cursor *CursPtr, **CursHandle;
  139.  
  140. struct PenState {
  141.     Point pnLoc;
  142.     Point pnSize;
  143.     short pnMode;
  144.     Pattern pnPat;
  145. };
  146.  
  147. typedef struct PenState PenState;
  148. struct Region {
  149.     short rgnSize;                    /*size in bytes*/
  150.     Rect rgnBBox;                    /*enclosing rectangle*/
  151. };
  152.  
  153. typedef struct Region Region;
  154. typedef Region *RgnPtr, **RgnHandle;
  155.  
  156. struct Picture {
  157.     short picSize;
  158.     Rect picFrame;
  159. };
  160.  
  161. typedef struct Picture Picture;
  162. typedef Picture *PicPtr, **PicHandle;
  163.  
  164. struct Polygon {
  165.     short polySize;
  166.     Rect polyBBox;
  167.     Point polyPoints[1];
  168. };
  169.  
  170. typedef struct Polygon Polygon;
  171. typedef Polygon *PolyPtr, **PolyHandle;
  172.  
  173. struct QDProcs {
  174.     Ptr textProc;
  175.     Ptr lineProc;
  176.     Ptr rectProc;
  177.     Ptr rRectProc;
  178.     Ptr ovalProc;
  179.     Ptr arcProc;
  180.     Ptr polyProc;
  181.     Ptr rgnProc;
  182.     Ptr bitsProc;
  183.     Ptr commentProc;
  184.     Ptr txMeasProc;
  185.     Ptr getPicProc;
  186.     Ptr putPicProc;
  187. };
  188.  
  189. typedef struct QDProcs QDProcs;
  190. typedef QDProcs *QDProcsPtr;
  191.  
  192. struct GrafPort {
  193.     short device;
  194.     BitMap portBits;
  195.     Rect portRect;
  196.     RgnHandle visRgn;
  197.     RgnHandle clipRgn;
  198.     Pattern bkPat;
  199.     Pattern fillPat;
  200.     Point pnLoc;
  201.     Point pnSize;
  202.     short pnMode;
  203.     Pattern pnPat;
  204.     short pnVis;
  205.     short txFont;
  206.     Style txFace;                    /*txFace is unpacked byte but push as short*/
  207.     char filler;
  208.     short txMode;
  209.     short txSize;
  210.     Fixed spExtra;
  211.     long fgColor;
  212.     long bkColor;
  213.     short colrBit;
  214.     short patStretch;
  215.     Handle picSave;
  216.     Handle rgnSave;
  217.     Handle polySave;
  218.     QDProcsPtr grafProcs;
  219. };
  220.  
  221. typedef struct GrafPort GrafPort;
  222. typedef GrafPort *GrafPtr;
  223.  
  224. typedef GrafPtr WindowPtr;
  225.  
  226. struct RGBColor {
  227.     unsigned short red;             /*magnitude of red component*/
  228.     unsigned short green;            /*magnitude of green component*/
  229.     unsigned short blue;            /*magnitude of blue component*/
  230. };
  231.  
  232. typedef struct RGBColor RGBColor;
  233. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  234. typedef pascal void (*ColorCompareProcPtr)(RGBColor *rgb);
  235.  
  236.  
  237. struct ColorSpec {
  238.     short value;                    /*index or other value*/
  239.     RGBColor rgb;                    /*true color*/
  240. };
  241.  
  242. typedef struct ColorSpec ColorSpec;
  243. typedef ColorSpec CSpecArray[1];    /* array [0..0] of ColorSpec */
  244.  
  245. struct ColorTable {
  246.     long ctSeed;                    /*unique identifier for table*/
  247.     short ctFlags;                    /*high bit: 0 = PixMap; 1 = device*/
  248.     short ctSize;                    /*number of entries in CTTable*/
  249.     CSpecArray ctTable;             /*array [0..0] of ColorSpec*/
  250. };
  251.  
  252. typedef struct ColorTable ColorTable;
  253. typedef ColorTable *CTabPtr, **CTabHandle;
  254.  
  255. struct MatchRec {
  256.     unsigned short red;
  257.     unsigned short green;
  258.     unsigned short blue;
  259.     long matchData;
  260. };
  261.  
  262. typedef struct MatchRec MatchRec;
  263. struct PixMap {
  264.     Ptr baseAddr;                    /*pointer to pixels*/
  265.     short rowBytes;                 /*offset to next line*/
  266.     Rect bounds;                    /*encloses bitmap*/
  267.     short pmVersion;                /*pixMap version number*/
  268.     short packType;                 /*defines packing format*/
  269.     long packSize;                    /*length of pixel data*/
  270.     Fixed hRes;                     /*horiz. resolution (ppi)*/
  271.     Fixed vRes;                     /*vert. resolution (ppi)*/
  272.     short pixelType;                /*defines pixel type*/
  273.     short pixelSize;                /*# bits in pixel*/
  274.     short cmpCount;                 /*# components in pixel*/
  275.     short cmpSize;                    /*# bits per component*/
  276.     long planeBytes;                /*offset to next plane*/
  277.     CTabHandle pmTable;             /*color map for this pixMap*/
  278.     long pmReserved;                /*for future use. MUST BE 0*/
  279. };
  280.  
  281. typedef struct PixMap PixMap;
  282. typedef PixMap *PixMapPtr, **PixMapHandle;
  283.  
  284. struct PixPat {
  285.     short patType;                    /*type of pattern*/
  286.     PixMapHandle patMap;            /*the pattern's pixMap*/
  287.     Handle patData;                 /*pixmap's data*/
  288.     Handle patXData;                /*expanded Pattern data*/
  289.     short patXValid;                /*flags whether expanded Pattern valid*/
  290.     Handle patXMap;                 /*Handle to expanded Pattern data*/
  291.     Pattern pat1Data;                /*old-Style pattern/RGB color*/
  292. };
  293.  
  294. typedef struct PixPat PixPat;
  295. typedef PixPat *PixPatPtr, **PixPatHandle;
  296.  
  297. struct CCrsr {
  298.     short crsrType;                 /*type of cursor*/
  299.     PixMapHandle crsrMap;            /*the cursor's pixmap*/
  300.     Handle crsrData;                /*cursor's data*/
  301.     Handle crsrXData;                /*expanded cursor data*/
  302.     short crsrXValid;                /*depth of expanded data (0 if none)*/
  303.     Handle crsrXHandle;             /*future use*/
  304.     Bits16 crsr1Data;                /*one-bit cursor*/
  305.     Bits16 crsrMask;                /*cursor's mask*/
  306.     Point crsrHotSpot;                /*cursor's hotspot*/
  307.     long crsrXTable;                /*private*/
  308.     long crsrID;                    /*private*/
  309. };
  310.  
  311. typedef struct CCrsr CCrsr;
  312. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  313.  
  314. struct CIcon {
  315.     PixMap iconPMap;                /*the icon's pixMap*/
  316.     BitMap iconMask;                /*the icon's mask*/
  317.     BitMap iconBMap;                /*the icon's bitMap*/
  318.     Handle iconData;                /*the icon's data*/
  319.     short iconMaskData[1];            /*icon's mask and BitMap data*/
  320. };
  321.  
  322. typedef struct CIcon CIcon;
  323. typedef CIcon *CIconPtr, **CIconHandle;
  324.  
  325. struct GammaTbl {
  326.     short gVersion;                 /*gamma version number*/
  327.     short gType;                    /*gamma data type*/
  328.     short gFormulaSize;             /*Formula data size*/
  329.     short gChanCnt;                 /*number of channels of data*/
  330.     short gDataCnt;                 /*number of values/channel*/
  331.     short gDataWidth;                /*bits/corrected value (data packed to next larger byte size)*/
  332.     short gFormulaData[1];            /*data for formulas followed by gamma values*/
  333. };
  334.  
  335. typedef struct GammaTbl GammaTbl;
  336. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  337.  
  338. struct ITab {
  339.     long iTabSeed;                    /*copy of CTSeed from source CTable*/
  340.     short iTabRes;                    /*bits/channel resolution of iTable*/
  341.     unsigned char iTTable[1];        /*byte colortable index values*/
  342. };
  343.  
  344. typedef struct ITab ITab;
  345. typedef ITab *ITabPtr, **ITabHandle;
  346.  
  347. struct SProcRec {
  348.     Handle nxtSrch;                 /*SProcHndl Handle to next SProcRec*/
  349.     ColorSearchProcPtr srchProc;    /*pointer to search procedure*/
  350. };
  351.  
  352. typedef struct SProcRec SProcRec;
  353. typedef SProcRec *SProcPtr, **SProcHndl;
  354.  
  355. struct CProcRec {
  356.     Handle nxtComp;                 /*CProcHndl Handle to next CProcRec*/
  357.     ColorCompareProcPtr compProc;    /*pointer to complement procedure*/
  358. };
  359.  
  360. typedef struct CProcRec CProcRec;
  361. typedef CProcRec *CProcPtr, **CProcHndl;
  362.  
  363. struct GDevice {
  364.     short gdRefNum;                 /*driver's unit number*/
  365.     short gdID;                     /*client ID for search procs*/
  366.     short gdType;                    /*fixed/CLUT/direct*/
  367.     ITabHandle gdITable;            /*Handle to inverse lookup table*/
  368.     short gdResPref;                /*preferred resolution of GDITable*/
  369.     SProcHndl gdSearchProc;         /*search proc list head*/
  370.     CProcHndl gdCompProc;            /*complement proc list*/
  371.     short gdFlags;                    /*grafDevice flags word*/
  372.     PixMapHandle gdPMap;            /*describing pixMap*/
  373.     long gdRefCon;                    /*reference value*/
  374.     Handle gdNextGD;                /*GDHandle Handle of next gDevice*/
  375.     Rect gdRect;                    /* device's bounds in global coordinates*/
  376.     long gdMode;                    /*device's current mode*/
  377.     short gdCCBytes;                /*depth of expanded cursor data*/
  378.     short gdCCDepth;                /*depth of expanded cursor data*/
  379.     Handle gdCCXData;                /*Handle to cursor's expanded data*/
  380.     Handle gdCCXMask;                /*Handle to cursor's expanded mask*/
  381.     long gdReserved;                /*future use. MUST BE 0*/
  382. };
  383.  
  384. typedef struct GDevice GDevice;
  385. typedef GDevice *GDPtr, **GDHandle;
  386.  
  387. struct GrafVars {
  388.     RGBColor rgbOpColor;            /*color for addPin    subPin and average*/
  389.     RGBColor rgbHiliteColor;        /*color for hiliting*/
  390.     Handle pmFgColor;                /*palette Handle for foreground color*/
  391.     short pmFgIndex;                /*index value for foreground*/
  392.     Handle pmBkColor;                /*palette Handle for background color*/
  393.     short pmBkIndex;                /*index value for background*/
  394.     short pmFlags;                    /*flags for Palette Manager*/
  395. };
  396.  
  397. typedef struct GrafVars GrafVars;
  398. typedef GrafVars *GVarPtr, **GVarHandle;
  399.  
  400. struct CQDProcs {
  401.     Ptr textProc;
  402.     Ptr lineProc;
  403.     Ptr rectProc;
  404.     Ptr rRectProc;
  405.     Ptr ovalProc;
  406.     Ptr arcProc;
  407.     Ptr polyProc;
  408.     Ptr rgnProc;
  409.     Ptr bitsProc;
  410.     Ptr commentProc;
  411.     Ptr txMeasProc;
  412.     Ptr getPicProc;
  413.     Ptr putPicProc;
  414.     Ptr opcodeProc;                 /*fields added to QDProcs*/
  415.     Ptr newProc1;
  416.     Ptr newProc2;
  417.     Ptr newProc3;
  418.     Ptr newProc4;
  419.     Ptr newProc5;
  420.     Ptr newProc6;
  421. };
  422.  
  423. typedef struct CQDProcs CQDProcs;
  424. typedef CQDProcs *CQDProcsPtr;
  425.  
  426. struct CGrafPort {
  427.     short device;
  428.     PixMapHandle portPixMap;        /*port's pixel map*/
  429.     short portVersion;                /*high 2 bits always set*/
  430.     Handle grafVars;                /*Handle to more fields*/
  431.     short chExtra;                    /*character extra*/
  432.     short pnLocHFrac;                /*pen fraction*/
  433.     Rect portRect;
  434.     RgnHandle visRgn;
  435.     RgnHandle clipRgn;
  436.     PixPatHandle bkPixPat;            /*background pattern*/
  437.     RGBColor rgbFgColor;            /*RGB components of fg*/
  438.     RGBColor rgbBkColor;            /*RGB components of bk*/
  439.     Point pnLoc;
  440.     Point pnSize;
  441.     short pnMode;
  442.     PixPatHandle pnPixPat;            /*pen's pattern*/
  443.     PixPatHandle fillPixPat;        /*fill pattern*/
  444.     short pnVis;
  445.     short txFont;
  446.     Style txFace;                    /*txFace is unpacked byte  push as short*/
  447.     char filler;
  448.     short txMode;
  449.     short txSize;
  450.     Fixed spExtra;
  451.     long fgColor;
  452.     long bkColor;
  453.     short colrBit;
  454.     short patStretch;
  455.     Handle picSave;
  456.     Handle rgnSave;
  457.     Handle polySave;
  458.     CQDProcsPtr grafProcs;
  459. };
  460.  
  461. typedef struct CGrafPort CGrafPort;
  462. typedef CGrafPort *CGrafPtr;
  463.  
  464. typedef CGrafPtr CWindowPtr;
  465.  
  466. struct ReqListRec {
  467.     short reqLSize;                 /*request list size*/
  468.     short reqLData[1];                /*request list data*/
  469. };
  470.  
  471. typedef struct ReqListRec ReqListRec;
  472. extern struct  {
  473. char privates[76];
  474. long randSeed;
  475. BitMap screenBits;
  476. Cursor arrow;
  477. Pattern dkGray;
  478. Pattern ltGray;
  479. Pattern gray;
  480. Pattern black;
  481. Pattern white;
  482. GrafPtr thePort;
  483. }qd;
  484.  
  485.  
  486.  
  487. #ifdef __cplusplus
  488. extern "C" {
  489. #endif
  490. pascal void InitGraf(void * globalPtr)
  491.     = 0xA86E;
  492. pascal void OpenPort(GrafPtr port)
  493.     = 0xA86F;
  494. pascal void InitPort(GrafPtr port)
  495.     = 0xA86D;
  496. pascal void ClosePort(GrafPtr port)
  497.     = 0xA87D;
  498. pascal void SetPort(GrafPtr port)
  499.     = 0xA873;
  500. pascal void GetPort(GrafPtr *port)
  501.     = 0xA874;
  502. pascal void GrafDevice(short device)
  503.     = 0xA872;
  504. pascal void SetPortBits(const BitMap *bm)
  505.     = 0xA875;
  506. pascal void PortSize(short width,short height)
  507.     = 0xA876;
  508. pascal void MovePortTo(short leftGlobal,short topGlobal)
  509.     = 0xA877;
  510. pascal void SetOrigin(short h,short v)
  511.     = 0xA878;
  512. pascal void SetClip(RgnHandle rgn)
  513.     = 0xA879;
  514. pascal void GetClip(RgnHandle rgn)
  515.     = 0xA87A;
  516. pascal void ClipRect(const Rect *r)
  517.     = 0xA87B;
  518. pascal void BackPat(Pattern pat)
  519.     = 0xA87C;
  520. pascal void InitCursor(void)
  521.     = 0xA850;
  522. pascal void SetCursor(const Cursor *crsr)
  523.     = 0xA851;
  524. pascal void HideCursor(void)
  525.     = 0xA852;
  526. pascal void ShowCursor(void)
  527.     = 0xA853;
  528. pascal void ObscureCursor(void)
  529.     = 0xA856;
  530. pascal void HidePen(void)
  531.     = 0xA896;
  532. pascal void ShowPen(void)
  533.     = 0xA897;
  534. pascal void GetPen(Point *pt)
  535.     = 0xA89A;
  536. pascal void GetPenState(PenState *pnState)
  537.     = 0xA898;
  538. pascal void SetPenState(const PenState *pnState)
  539.     = 0xA899;
  540. pascal void PenSize(short width,short height)
  541.     = 0xA89B;
  542. pascal void PenMode(short mode)
  543.     = 0xA89C;
  544. pascal void PenPat(Pattern pat)
  545.     = 0xA89D;
  546. pascal void PenNormal(void)
  547.     = 0xA89E;
  548. pascal void MoveTo(short h,short v)
  549.     = 0xA893;
  550. pascal void Move(short dh,short dv)
  551.     = 0xA894;
  552. pascal void LineTo(short h,short v)
  553.     = 0xA891;
  554. pascal void Line(short dh,short dv)
  555.     = 0xA892;
  556. pascal void TextFont(short font)
  557.     = 0xA887;
  558. pascal void TextFace(short face)
  559.     = 0xA888;
  560. pascal void TextMode(short mode)
  561.     = 0xA889;
  562. pascal void TextSize(short size)
  563.     = 0xA88A;
  564. pascal void SpaceExtra(Fixed extra)
  565.     = 0xA88E;
  566. pascal void DrawChar(short ch)
  567.     = 0xA883;
  568. pascal void DrawString(const Str255 s)
  569.     = 0xA884;
  570. pascal void DrawText(Ptr textBuf,short firstByte,short byteCount)
  571.     = 0xA885;
  572. pascal short CharWidth(short ch)
  573.     = 0xA88D;
  574. pascal short StringWidth(const Str255 s)
  575.     = 0xA88C;
  576. pascal short TextWidth(Ptr textBuf,short firstByte,short byteCount)
  577.     = 0xA886;
  578. pascal void MeasureText(short count,Ptr textAddr,Ptr charLocs)
  579.     = 0xA837;
  580. pascal void GetFontInfo(FontInfo *info)
  581.     = 0xA88B;
  582. pascal void ForeColor(long color)
  583.     = 0xA862;
  584. pascal void BackColor(long color)
  585.     = 0xA863;
  586. pascal void ColorBit(short whichBit)
  587.     = 0xA864;
  588. pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
  589.     = 0xA8A7;
  590. pascal void OffsetRect(Rect *r,short dh,short dv)
  591.     = 0xA8A8;
  592. pascal void InsetRect(Rect *r,short dh,short dv)
  593.     = 0xA8A9;
  594. pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  595.     = 0xA8AA;
  596. pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  597.     = 0xA8AB;
  598. pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
  599.     = 0xA8A6;
  600. pascal Boolean EmptyRect(const Rect *r)
  601.     = 0xA8AE;
  602. pascal void FrameRect(const Rect *r)
  603.     = 0xA8A1;
  604. pascal void PaintRect(const Rect *r)
  605.     = 0xA8A2;
  606. pascal void EraseRect(const Rect *r)
  607.     = 0xA8A3;
  608. pascal void InvertRect(const Rect *r)
  609.     = 0xA8A4;
  610. pascal void FillRect(const Rect *r,Pattern pat)
  611.     = 0xA8A5;
  612. pascal void FrameOval(const Rect *r)
  613.     = 0xA8B7;
  614. pascal void PaintOval(const Rect *r)
  615.     = 0xA8B8;
  616. pascal void EraseOval(const Rect *r)
  617.     = 0xA8B9;
  618. pascal void InvertOval(const Rect *r)
  619.     = 0xA8BA;
  620. pascal void FillOval(const Rect *r,Pattern pat)
  621.     = 0xA8BB;
  622. pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  623.     = 0xA8B0;
  624. pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  625.     = 0xA8B1;
  626. pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  627.     = 0xA8B2;
  628. pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  629.     = 0xA8B3;
  630. pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  631.     Pattern pat)
  632.     = 0xA8B4;
  633. pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
  634.     = 0xA8BE;
  635. pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
  636.     = 0xA8BF;
  637. pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
  638.     = 0xA8C0;
  639. pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
  640.     = 0xA8C1;
  641. pascal void FillArc(const Rect *r,short startAngle,short arcAngle,Pattern pat)
  642.     = 0xA8C2;
  643. pascal RgnHandle NewRgn(void)
  644.     = 0xA8D8;
  645. pascal void OpenRgn(void)
  646.     = 0xA8DA;
  647. pascal void CloseRgn(RgnHandle dstRgn)
  648.     = 0xA8DB;
  649. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
  650.     = 0xA8D7;
  651. pascal void DisposeRgn(RgnHandle rgn)
  652.     = 0xA8D9;
  653. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  654.     = 0xA8DC;
  655. pascal void SetEmptyRgn(RgnHandle rgn)
  656.     = 0xA8DD;
  657. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  658.     = 0xA8DE;
  659. pascal void RectRgn(RgnHandle rgn,const Rect *r)
  660.     = 0xA8DF;
  661. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  662.     = 0xA8E0;
  663. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  664.     = 0xA8E1;
  665. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  666.     = 0xA8E4;
  667. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  668.     = 0xA8E5;
  669. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  670.     = 0xA8E6;
  671. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  672.     = 0xA8E7;
  673. pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
  674.     = 0xA8E9;
  675. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  676.     = 0xA8E3;
  677. pascal Boolean EmptyRgn(RgnHandle rgn)
  678.     = 0xA8E2;
  679. pascal void FrameRgn(RgnHandle rgn)
  680.     = 0xA8D2;
  681. pascal void PaintRgn(RgnHandle rgn)
  682.     = 0xA8D3;
  683. pascal void EraseRgn(RgnHandle rgn)
  684.     = 0xA8D4;
  685. pascal void InvertRgn(RgnHandle rgn)
  686.     = 0xA8D5;
  687. pascal void FillRgn(RgnHandle rgn,Pattern pat)
  688.     = 0xA8D6;
  689. pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
  690.     = 0xA8EF;
  691. pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  692.     const Rect *dstRect,short mode,RgnHandle maskRgn)
  693.     = 0xA8EC;
  694. pascal void SeedFill(Ptr srcPtr,Ptr dstPtr,short srcRow,short dstRow,short height,
  695.     short words,short seedH,short seedV)
  696.     = 0xA839;
  697. pascal void CalcMask(Ptr srcPtr,Ptr dstPtr,short srcRow,short dstRow,short height,
  698.     short words)
  699.     = 0xA838;
  700. pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  701.     const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
  702.     = 0xA817;
  703. pascal PicHandle OpenPicture(const Rect *picFrame)
  704.     = 0xA8F3;
  705. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  706.     = 0xA8F2;
  707. pascal void ClosePicture(void)
  708.     = 0xA8F4;
  709. pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
  710.     = 0xA8F6;
  711. pascal void KillPicture(PicHandle myPicture)
  712.     = 0xA8F5;
  713. pascal PolyHandle OpenPoly(void)
  714.     = 0xA8CB;
  715. pascal void ClosePoly(void)
  716.     = 0xA8CC;
  717. pascal void KillPoly(PolyHandle poly)
  718.     = 0xA8CD;
  719. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  720.     = 0xA8CE;
  721. pascal void FramePoly(PolyHandle poly)
  722.     = 0xA8C6;
  723. pascal void PaintPoly(PolyHandle poly)
  724.     = 0xA8C7;
  725. pascal void ErasePoly(PolyHandle poly)
  726.     = 0xA8C8;
  727. pascal void InvertPoly(PolyHandle poly)
  728.     = 0xA8C9;
  729. pascal void FillPoly(PolyHandle poly,Pattern pat)
  730.     = 0xA8CA;
  731. pascal void SetPt(Point *pt,short h,short v)
  732.     = 0xA880;
  733. pascal void LocalToGlobal(Point *pt)
  734.     = 0xA870;
  735. pascal void GlobalToLocal(Point *pt)
  736.     = 0xA871;
  737. pascal short Random(void)
  738.     = 0xA861;
  739. pascal void StuffHex(Ptr thingPtr,const Str255 s)
  740.     = 0xA866;
  741. pascal Boolean GetPixel(short h,short v)
  742.     = 0xA865;
  743. pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  744.     = 0xA8F8;
  745. pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  746.     = 0xA8F9;
  747. pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
  748.     = 0xA8FA;
  749. pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
  750.     = 0xA8FB;
  751. pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
  752.     = 0xA8FC;
  753. pascal void SetStdProcs(QDProcs *procs)
  754.     = 0xA8EA;
  755. pascal void StdRect(GrafVerb verb,const Rect *r)
  756.     = 0xA8A0;
  757. pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
  758.     = 0xA8AF;
  759. pascal void StdOval(GrafVerb verb,const Rect *r)
  760.     = 0xA8B6;
  761. pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
  762.     = 0xA8BD;
  763. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  764.     = 0xA8C5;
  765. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  766.     = 0xA8D1;
  767. pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
  768.     short mode,RgnHandle maskRgn)
  769.     = 0xA8EB;
  770. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  771.     = 0xA8F1;
  772. pascal short StdTxMeas(short byteCount,Ptr textAddr,Point *numer,Point *denom,
  773.     FontInfo *info)
  774.     = 0xA8ED;
  775. pascal void StdGetPic(Ptr dataPtr,short byteCount)
  776.     = 0xA8EE;
  777. pascal void StdPutPic(Ptr dataPtr,short byteCount)
  778.     = 0xA8F0;
  779. pascal void AddPt(Point src,Point *dst)
  780.     = 0xA87E;
  781. void subpt(Point *src,Point *dst);
  782. pascal Boolean EqualPt(Point pt1,Point pt2)
  783.     = 0xA881;
  784. pascal Boolean PtInRect(Point pt,const Rect *r)
  785.     = 0xA8AD;
  786. pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
  787.     = 0xA8AC;
  788. pascal void PtToAngle(const Rect *r,Point pt,short *angle)
  789.     = 0xA8C3;
  790. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  791.     = 0xA8E8;
  792. pascal void StdText(short count,Ptr textAddr,Point numer,Point denom)
  793.     = 0xA882;
  794. pascal void StdLine(Point newPt)
  795.     = 0xA890;
  796. pascal void OpenCPort(CGrafPtr port)
  797.     = 0xAA00;
  798. pascal void InitCPort(CGrafPtr port)
  799.     = 0xAA01;
  800. pascal void CloseCPort(CGrafPtr port)
  801.     = 0xA87D;
  802. pascal PixMapHandle NewPixMap(void)
  803.     = 0xAA03;
  804. pascal void DisposPixMap(PixMapHandle pm)
  805.     = 0xAA04;
  806. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  807.     = 0xAA05;
  808. pascal PixPatHandle NewPixPat(void)
  809.     = 0xAA07;
  810. pascal void DisposPixPat(PixPatHandle pp)
  811.     = 0xAA08;
  812. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  813.     = 0xAA09;
  814. pascal void PenPixPat(PixPatHandle pp)
  815.     = 0xAA0A;
  816. pascal void BackPixPat(PixPatHandle pp)
  817.     = 0xAA0B;
  818. pascal PixPatHandle GetPixPat(short patID)
  819.     = 0xAA0C;
  820. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
  821.     = 0xAA0D;
  822. pascal void FillCRect(const Rect *r,PixPatHandle pp)
  823.     = 0xAA0E;
  824. pascal void FillCOval(const Rect *r,PixPatHandle pp)
  825.     = 0xAA0F;
  826. pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  827.     PixPatHandle pp)
  828.     = 0xAA10;
  829. pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
  830.     = 0xAA11;
  831. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  832.     = 0xAA12;
  833. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  834.     = 0xAA13;
  835. pascal void RGBForeColor(const RGBColor *color)
  836.     = 0xAA14;
  837. pascal void RGBBackColor(const RGBColor *color)
  838.     = 0xAA15;
  839. pascal void SetCPixel(short h,short v,const RGBColor *cPix)
  840.     = 0xAA16;
  841. pascal void SetPortPix(PixMapHandle pm)
  842.     = 0xAA06;
  843. pascal void GetCPixel(short h,short v,RGBColor *cPix)
  844.     = 0xAA17;
  845. pascal void GetForeColor(RGBColor *color)
  846.     = 0xAA19;
  847. pascal void GetBackColor(RGBColor *color)
  848.     = 0xAA1A;
  849. pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  850.     const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  851.     long matchData)
  852.     = 0xAA50;
  853. pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  854.     const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
  855.     long matchData)
  856.     = 0xAA4F;
  857. pascal void OpColor(const RGBColor *color)
  858.     = 0xAA21;
  859. pascal void HiliteColor(const RGBColor *color)
  860.     = 0xAA22;
  861. pascal void DisposCTable(CTabHandle cTable)
  862.     = 0xAA24;
  863. pascal CTabHandle GetCTable(short ctID)
  864.     = 0xAA18;
  865. pascal CCrsrHandle GetCCursor(short crsrID)
  866.     = 0xAA1B;
  867. pascal void SetCCursor(CCrsrHandle cCrsr)
  868.     = 0xAA1C;
  869. pascal void AllocCursor(void)
  870.     = 0xAA1D;
  871. pascal void DisposCCursor(CCrsrHandle cCrsr)
  872.     = 0xAA26;
  873. pascal CIconHandle GetCIcon(short iconID)
  874.     = 0xAA1E;
  875. pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
  876.     = 0xAA1F;
  877. pascal void DisposCIcon(CIconHandle theIcon)
  878.     = 0xAA25;
  879. pascal void SetStdCProcs(CQDProcs *procs)
  880.     = 0xAA4E;
  881. pascal void CharExtra(Fixed extra)
  882.     = 0xAA23;
  883. pascal GDHandle GetMaxDevice(const Rect *globalRect)
  884.     = 0xAA27;
  885. pascal long GetCTSeed(void)
  886.     = 0xAA28;
  887. pascal GDHandle GetDeviceList(void)
  888.     = 0xAA29;
  889. pascal GDHandle GetMainDevice(void)
  890.     = 0xAA2A;
  891. pascal GDHandle GetNextDevice(GDHandle curDevice)
  892.     = 0xAA2B;
  893. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  894.     = 0xAA2C;
  895. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  896.     = 0xAA2D;
  897. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  898.     = 0xAA2E;
  899. pascal GDHandle NewGDevice(short refNum,long mode)
  900.     = 0xAA2F;
  901. pascal void DisposGDevice(GDHandle gdh)
  902.     = 0xAA30;
  903. pascal void SetGDevice(GDHandle gd)
  904.     = 0xAA31;
  905. pascal GDHandle GetGDevice(void)
  906.     = 0xAA32;
  907. pascal long Color2Index(const RGBColor *myColor)
  908.     = 0xAA33;
  909. pascal void Index2Color(long index,RGBColor *aColor)
  910.     = 0xAA34;
  911. pascal void InvertColor(RGBColor *myColor)
  912.     = 0xAA35;
  913. pascal Boolean RealColor(const RGBColor *color)
  914.     = 0xAA36;
  915. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  916.     = 0xAA37;
  917. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  918.     = 0xAA39;
  919. pascal void AddSearch(ColorSearchProcPtr searchProc)
  920.     = 0xAA3A;
  921. pascal void AddComp(ColorCompareProcPtr compProc)
  922.     = 0xAA3B;
  923. pascal void DelSearch(ColorSearchProcPtr searchProc)
  924.     = 0xAA4C;
  925. pascal void DelComp(ColorCompareProcPtr compProc)
  926.     = 0xAA4D;
  927. pascal void SubPt(Point src,Point *dst)
  928.     = 0xA87F;
  929. pascal void SetClientID(short id)
  930.     = 0xAA3C;
  931. pascal void ProtectEntry(short index,Boolean protect)
  932.     = 0xAA3D;
  933. Boolean equalpt(Point *pt1,Point *pt2); 
  934. pascal void ReserveEntry(short index,Boolean reserve)
  935.     = 0xAA3E;
  936. pascal void SetEntries(short start,short count,CSpecArray aTable)
  937.     = 0xAA3F;
  938. Boolean ptinrect(Point *pt,const Rect *r);
  939. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
  940.     = 0xAA49;
  941. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
  942.     = 0xAA4A;
  943. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect);
  944. pascal short QDError(void)
  945.     = 0xAA40;
  946. pascal Ptr GetMaskTable(void);
  947. void pttoangle(const Rect *r,Point *pt,short *angle);
  948. Boolean ptinrgn(Point *pt,RgnHandle rgn);
  949. void stdtext(short count,Ptr textAddr,Point *numer,Point *denom);
  950. void stdline(Point *newPt); 
  951. void drawstring(char *s);
  952. void addpt(Point *src,Point *dst);
  953. void stuffhex(Ptr thingPtr,char *s);
  954. short stringwidth(char *s); 
  955. #ifdef __cplusplus
  956. }
  957. #endif
  958.  
  959. #endif
  960.